﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>搜索</title>
<!--<link href="sysImages/default/css/css.css" rel="stylesheet" type="text/css" />-->
<script language="javascript" type="text/javascript" src="configuration/js/Prototype.js"></script>
    <script type="text/javascript" src="/Templets/xxbn/css/jquery.js"></script>
    <script type="text/javascript" src="/Templets/xxbn/css/newdai.js"></script>
    <script type="text/javascript" src="/Templets/xxbn/css/olddai.js"></script>
    <script type="text/javascript" src="/Templets/xxbn/css/imedai.js"></script>
<style type="text/css">
/* CSS Document */
@font-face 
{
	font-family:HGTAIWH; src:url("/fonts/HG_Tai_WB.eot");
}
body {
    font-family:HGTAIWH, Arial, '新宋体', sans-serif ;
	margin:10;
	padding:0;
	background: #FFF;
	font-size:18pt;
	color: #74accf;
	margin-left: 0px;
	margin-top: 0px;
	background-color: #F7F7F7;
	line-height:20px;
}
.SpecialFontFamily
{
	font-size:18pt;
	font-family:HGTAIWH,Verdana, Arial, sans-serif;
}
.class1
{
	font-size:18pt;
	color:#FF0000;
}
.classnoe
{
	font-size:14pt;
}
</style>

<script type="text/javascript">
    function isArabicNumerals(el) {
        if (el.style.backgroundPosition == '0px 15px') {
            el.style.backgroundPosition = '0px 30px';
            IME.arabicNumerals = false;
        }
        else {
            el.style.backgroundPosition = '0px 15px';
            IME.arabicNumerals = true;
        }
    }

    function isNewDai(el) {
        if (el.style.backgroundPosition == '0px 45px') {
            el.style.backgroundPosition = '0px 60px';
            CodeList = CodeListNew;
            CodeList = CodeList.split(',');
        }
        else {
            el.style.backgroundPosition = '0px 45px';
            CodeList = CodeListOld;
            CodeList = CodeList.split(',');
        }
    }

    jQuery(document).ready(function() {

        jQuery(document).click(function() { jQuery("#ime").css("display", "none"); });
        jQuery.each(jQuery("#txtSearch"), function() {
            jQuery(this).css("font-family", "HGTAIWH");
            jQuery(this).css("font-size", "12pt");
            jQuery(this).keydown(function() {
                var e = window.event || e;
                var srcElement = e.srcElement || e.target;
                e.element = srcElement;

                if (e.keyCode == 8) {
                    this.focus();
                }
                var obj = ImeKeyDown(e);

                jQuery("#inputChar").html(IME.Comp.value);
                jQuery("#candicated").html(IME.Cand.value);

                if (IME.Cand.value.length == 0 && IME.Comp.value.length == 0) {
                    jQuery("#ime").css("display", "none");
                    IME.arabicNumerals = true;
                }
                this.value = IME.InputArea.value; //IME.InputArea.value;

                return obj;
            }).keypress(function() {
                var obj = ImeKeyPress(event);

                jQuery("#inputChar").html(IME.Comp.value);
                jQuery("#candicated").html(IME.Cand.value);

                if (IME.Cand.value.length > 0) {
                    jQuery("#ime").css("display", "block");
                    jQuery("#ime").css("top", (jQuery(this).offset().top + 40) + "px");
                    jQuery("#ime").css("left", jQuery(this).offset().left);

                    appendTrace(IME.Cand.value.length);
                    appendTrace(jQuery("#candicated").height() + " w:" + jQuery("#candicated").width());

                    if (IME.Cand.value.length > 55) {
                        jQuery("#draggable").css("height", "96px");
                    }
                    else {
                        jQuery("#draggable").css("height", "70px");
                    }
                    IME.arabicNumerals = false;
                }
                else {
                    if (IME.Cand.value.length == 0 && IME.Comp.value.length == 0) {
                        jQuery("#ime").css("display", "none");
                        IME.arabicNumerals = true;
                    }
                }

                return obj;
            }).keyup(function() {
                var obj = ImeKeyUp(event);
                return obj;
            }).blur(function() {
                IME.InputArea.value = "";
                IME.Comp.value = "";
                IME.Cand.value = "";

                jQuery("#inputChar").html("");
                jQuery("#candicated").html("");
            }).focus(function() {
                IME.InputArea.value = this.value;
            });
        });
    });
</script>


</head>
<body onload="getUrlParam(); BodyOnLoad(); ">
  <form id="form1">
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#EEEEEE">
  <tr>
	<td width="22%" rowspan="2"><a href="http://www.dw12.com" target="_blank"><img src="/files/siteFiles/logo.gif" width="220" height="110" alt="powered by HuaGuang ImageSetter"  border="0" /></a></td>
	<td valign="bottom" style="width:40%;height:26px;"><span id="snews" class="class1" onclick="getType('news')" style="cursor:pointer;font-size:14px;">ᦑᧂ ᦆᦱᧁᧈ</span>　<span  class="classnoe" onclick="getType('tag')" id="stag" style="cursor:pointer;font-size:14px;">ᦏ ᦜᦱ</span>　<span  class="classnoe" onclick="getType('author')" id="sauthor" style="cursor:pointer;font-size:14px;">ᦕᦴᧉ ᦷᦂᧆ ᦵᦵᦎᧄᧉ</span>　<span  class="classnoe" onclick="getType('edit')" id="sedit" style="cursor:pointer;font-size:14px;">ᦕᦴᧉ ᦷᦂᧆ ᦘᦻᧈ</span></td>
	<td width="38%" rowspan="2">&nbsp;</td>
  </tr>
  <tr>
	<td>
	<input id="type" name="type" type="hidden" value="news" />
	<input id="chid" name="chid" type="hidden" value="" />
	<input name="tags" type="text" id="txtSearch" size="30" class="SpecialFontFamily" />
	<input type="button" name="Submit1" style="font-family:HGTAIWH,Arial;font-size:12px;" value="ᦌᦸᦰ ᦠᦱ ᦺᦔ ᦵᦵᦏᧄ"  onclick="javascript:SearchGo(this.form);" /></td>
  </tr>
</table>

<div id="ime" style="z-index:999; display:none; position:absolute; left:1px; top:1px;">
      <div class="ui-widget-content" id="draggable">
          <span class="ui-widget-header" id="dragAnchor" >&nbsp;&nbsp;</span>
          <span id="inputChar" style="font-size:12pt;"></span>
          <div id="candicated" style="font-family:HGTAIWH; font-size:16pt;"></div>
      </div>
</div>

<div style=" display:none;">
	    <input id="Comp" name="Comp" type="text"  />
	    <textarea id="Cand"  name="Cand" cols="20" rows="11"  style="font-family:HGTAIWH; font-size:16pt;" ></textarea>
	    <textarea id="InputArea"  name="InputArea" cols="20" rows="11" style="font-family:HGTAIWH; font-size:16pt;"></textarea>
	    <input id="EnglishMode" name="EnglishMode" type="checkbox"  />英文(Ctrl)OnFocus="IME.InputArea.focus()"
        <input id="FullShape" name="FullShape" type="checkbox"  />全形字符(F12)OnFocus="IME.InputArea.focus()"
        <input id="AutoUp" name="AutoUp" type="checkbox" checked="checked"  />自动上字OnFocus="IME.InputArea.focus()"　翻页 PageUp/PageDown  
        <textarea id="TraceConsole"  name="TraceConsole" cols="20" rows="11" ></textarea>
</div>

</form>

<div style="padding-left:15px;padding-top:15px;" >
<span id="Span_SearchList"><img alt="搜索中..." src="sysImages/folder/loading.gif" style="border:0px;" />正在搜索...</span>
 
<script language="javascript" type="text/javascript">
function getUrlParam()
{
    var str=window.location.href; 
    String.prototype.getQuery = function(name) 
    { 
　　    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); 
　　    var r = this.substr(this.indexOf("\?")+1).match(reg); 
　　    if (r!=null) return unescape(r[2]); return null; 
    } 
    var getid = str.getQuery("type"); 
    var getids =  getid;
    var getchid = str.getQuery("ChID");
    if(getid==null)
    {
         getids="news";
    }
	document.getElementById("type").value=getids;
	document.getElementById("chid").value=getchid;
	document.getElementById("tags").value=unescape(str.getQuery("tags"));
	var ctype= getids;
    getType(ctype);
}
var request=window.location.search;
var Action = request.substring(1,request.length);

function getType(typ)
{
	if(typ=="news")
	{
		document.getElementById("type").value="news";
		document.getElementById("snews").className="class1";
		document.getElementById("stag").className="classnoe";
		document.getElementById("sedit").className="classnoe";
		document.getElementById("sauthor").className="classnoe";
	}
	else if(typ=="tag")
	{
		document.getElementById("type").value="tag";
		document.getElementById("stag").className="class1";
		document.getElementById("snews").className="classnoe";
		document.getElementById("sedit").className="classnoe";
		document.getElementById("sauthor").className="classnoe";
	}
	else if(typ=="edit")
	{
		document.getElementById("type").value="edit";
		document.getElementById("sedit").className="class1";
		document.getElementById("snews").className="classnoe";
		document.getElementById("sauthor").className="classnoe";
		document.getElementById("stag").className="classnoe";
	}
	else if(typ=="author")
	{
		document.getElementById("type").value="author";
		document.getElementById("sauthor").className="class1";
		document.getElementById("snews").className="classnoe";
		document.getElementById("sedit").className="classnoe";
		document.getElementById("stag").className="classnoe";
	}
}

function SearchGo(obj)
{
	if(document.getElementById("tags").value=="")
	{
	    alert("填写关键字\n");
	    document.getElementById("tags").focus();
	    return false;
	}
	if(obj.chid.value==""||isNaN(obj.chid.value))
	{
	    window.location.href='Search.html?type='+document.getElementById("type").value +'&tags='+escape(obj.tags.value);
	}
	else
	{
	    window.location.href='Search.html?type='+document.getElementById("type").value +'&ChID='+escape(obj.chid.value)+'&tags='+escape(obj.tags.value);
	}
}

function GetSearchList(page)
{
   if(Action.indexOf('&page=')>-1)
       Action = Action.replace(/\&page=\d+/,'&page='+ page);
   else
   {
       Action+='&page='+page;
   }
   var options={ 
                  method:'get', 
                  parameters:Action, 
                  onComplete:function(transport) 
                  { 
                      var returnvalue=transport.responseText; 
                      if (returnvalue.indexOf("??")>-1) 
                          document.getElementById("Span_SearchList").innerHTML='搜索失败'; 
                      else 
                          document.getElementById("Span_SearchList").innerHTML=returnvalue; 
                  } 
               }; 
   new  Ajax.Request('Search.aspx?no-cache='+Math.random(),options);
}
GetSearchList(1);

function sendfriend(url,title) {   
   var clipBoardContent=''; 
   clipBoardContent+=title;
   clipBoardContent+='\r\n'+url+'\r\n\r\n这篇文章不错，您有空去看看吧(不是病毒哦)';
    if(window.clipboardData)   
    {   
        window.clipboardData.clearData();   
        window.clipboardData.setData("Text", clipBoardContent);  
    }   
    else if(navigator.userAgent.indexOf("Opera") != -1)   
    {   
        window.location = clipBoardContent;   
    }   
    else if (window.netscape)   
    {   
        try {   
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");   
        }   
        catch (e)   
        {   
            alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");   
        }   
        var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);   
        if (!clip)   
            return;   
        var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);   
        if (!trans)   
            return;   
        trans.addDataFlavor('text/unicode');   
        var str = new Object();   
        var len = new Object();   
        var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);   
        var copytext = clipBoardContent;   
        str.data = copytext;   
        trans.setTransferData("text/unicode",str,copytext.length*2);   
        var clipid = Components.interfaces.nsIClipboard;   
        if (!clip)   
            return false;   
        clip.setData(trans,null,clipid.kGlobalClipboard);   
    }   
      alert("你已复制链接及标题，请粘贴到QQ/MSN等发给好友!"); 
} 
</script>
</div>
<div style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;height:50px;text-align:center;">
Powered by WEBFASTCMS v1.0 
</div>
</body>
</html>
